module Comp (
        
    input [31:0] a,
    input [31:0] b,
    input [2:0] op,
    
    output compout
    
    );

    reg [0:0] result;
    assign compout = result;

    always @(*)
    begin

        // Operation code -- decides which operation shall be executed
        case (op)
    
            3'b000 : result = (a == b);
            3'b001 : result = (a[31]^b[31]) ? (a <= b) : (a >= b);
            3'b010 : result = (a[31]^b[31]) ? (a >= b) : (a <= b);
            3'b011 : result = (a[31]^b[31]) ? (a < b) : (a > b);
            3'b100 : result = (a[31]^b[31]) ? (a > b) : (a < b);
            3'b101 : result = (a != b);
    
        endcase



    end


endmodule
